import { IndexInterceptor } from '@libs/common/interceptors';
import { Body, Controller, Post, UseInterceptors } from '@nestjs/common';

import { MemberIndexDto, ShowMemberDto } from './dto/member.dto';
import { MemberService } from './member.service';

@Controller('ding/member')
export class MemberController {
  constructor(private readonly memberService: MemberService) {}

  @Post('index')
  @UseInterceptors(new IndexInterceptor())
  index(@Body() dto: MemberIndexDto) {
    return this.memberService.index(dto);
  }

  @Post('show')
  show(@Body() dto: ShowMemberDto) {
    return this.memberService.show(dto);
  }
}
